home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / alpha < prev    next >
Text File  |  1995-03-31  |  4KB  |  92 lines

  1. Article 1025 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!cs.utexas.edu!helios!tamuts!n023el
  3. From: n023el@tamuts.tamu.edu (Robert Ellis)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: ALPHA_key SYSEVAL?
  6. Message-ID: <7525@helios.TAMU.EDU>
  7. Date: 18 Aug 90 10:38:17 GMT
  8. Sender: usenet@helios.TAMU.EDU
  9. Organization: Texas A&M University
  10. Lines: 78
  11.  
  12. I am posting this for Rick Grevelle.
  13. -------------------------------------------------------------------------
  14. From: Rick Grevelle <uunet!tamuts.tamu.edu!n242df>
  15. Subject: Finding Prefixed Machine Routines In The 48.
  16.  
  17. Some of the more interesting SYSEVALs are those routines which are prefixed
  18. with their own address.  This is the way in which  RPL calls machine code.
  19. These routines can in turn call up other machine routines that have no
  20. prefix, or they can call to another RPL routine.
  21.  
  22. Disassembling these routines can yield a wealth of information.  The group
  23. of engineers at HP that wrote them are extraordinaryly skilled.  One can 
  24. acquire a great deal of knowledge about assembler in a relatively short
  25. period of time by simply examining the code contained within these programs
  26.  
  27. Unfortunately, finding these routines can be somewhat tricky, as well as slow
  28. when using a PEEK program.  Furthermore, because no two routines share the 
  29. same prefix, Alonzo's FIND routine will not facilitate the task either.
  30.  
  31. I've written a routine specifically to find these invaluable SYSEVALs.  With
  32. the intentions of keeping the routine short, I've made no allowances for error
  33. checking.  Level 1 MUST CONTAIN A BINARY INTEGER!  This lets the routine know
  34. where to start looking.  The RESULT address is one plus the actual address of
  35. the SYSEVAL, so that in order to resume searching, just reactivate the program.
  36.   
  37. CMACF will create a Code object that is the MACF (machine find) program.
  38. By storing this in a variable, the search process can be easily automated 
  39. by outputting the data to a PC or infrared printer.  I'll include an example.
  40.  
  41. From # 0h to # 6FFFFh I've found 1,497 of these routines.  Many of which are 
  42. quite recognizable from my 28 ROM map.  But there are many more that are new
  43. and unexplored. The reason for posting this program is so that others too 
  44. might generate this massive list and begin exploring the 48's ROM.  Lately 
  45. there has been quite a bit of complaining about the inability to program 
  46. the ALPHA_key.  If a SYSEVAL exist for the ALPHA_key, it will more than 
  47. likely be amoung these addresses.
  48.  
  49.   
  50. CMACF [4152]
  51.  
  52. \<<
  53.        # 3174197160731741h
  54.        # 181314E331741607h
  55.        # 4173170EC6A830F8h
  56.        # C808461241173705h      
  57.    1  3  START
  58.           # 5193h   SYSEVAL
  59.          NEXT  #2DCCh
  60.           # 5A03h   SYSEVAL
  61.           # 5ACCh   SYSEVAL
  62. \>>
  63.  
  64.  
  65. Remember that each address generated by MACF is one higher than the actual
  66. SYSEVAL address.  If you don't read Saturn Assembler, and you are going to
  67. test these by SYSEVALing, back up your calculator's memory, as you're going 
  68. suffer repeated memory losses.  This is absolutely guaranteed!
  69.  
  70. Here is a program which will generate all 1,497 addresses by outputting to
  71. an HP infrared printer, providing there is one availble.  To use this program 
  72. store the Code object generate by CMACF in a variable MACF.  By placing # 0h 
  73. on the stack, GLIST will test all of the address space of the address space
  74. between # 0h and # 6D37Dh; the last routine before # 6FFFFh.
  75.  
  76.  
  77. GLIST [2072] 
  78.  
  79. \<<
  80.       WHILE  DUP
  81.     # 6D37Ch  < 
  82.       REPEAT  MACF  1 -
  83.     PRT1  1  +
  84.       END
  85. \>>
  86.  
  87. Time permitting, I shall try to answer any questions.
  88.  
  89. Rick Grevelle
  90.  
  91.  
  92.